import os
import shutil

# def read_file(path: str) -> str:
#     """
#     Reads the content of a file at the given path.
#     """
#     try:
#         with open(path, 'r', encoding='utf-8') as f:
#             return f.read()
#     except FileNotFoundError:
#         return f"Error: File not found at {path}"
#     except Exception as e:
#         return f"Error reading file: {e}"

# def write_file(path: str, content: str) -> str:
#     """
#     Writes content to a file at the given path.
#     """
#     try:
#         with open(path, 'w', encoding='utf-8') as f:
#             f.write(content)
#         return f"Successfully wrote to {path}"
#     except Exception as e:
#         return f"Error writing to file: {e}"

# def delete_file(path: str) -> str:
#     """
#     Deletes a file at the given path.
#     """
#     try:
#         os.remove(path)
#         return f"Successfully deleted {path}"
#     except FileNotFoundError:
#         return f"Error: File not found at {path}"
#     except Exception as e:
#         return f"Error deleting file: {e}"

# def delete_directory(path: str) -> str:
#     """删除给定路径的目录。"""
#     try:
#         shutil.rmtree(path)
#         return f"Successfully deleted directory {path}"
#     except FileNotFoundError:
#         return f"Error: Directory not found at {path}"
#     except Exception as e:
#         return f"Error deleting directory: {e}"